#pragma once

class ip_data_manager;
class ip_phone_manager;

class slider_volume_dlg : public CDialogBase
{
	DECLARE_DYNAMIC(slider_volume_dlg)
public:
	slider_volume_dlg(CWnd* pParent = NULL);  
	virtual ~slider_volume_dlg();
	enum { IDD = IDD_IP_PHONE_SLIDER_VOLUME_DLG };
	void set_notify(HWND hwnd_, int pane_index_)
	{
		notify_wnd_ = hwnd_;	
		paren_index_ = pane_index_;
	}	
private:
	int  paren_index_;
	HWND notify_wnd_;
protected:
	virtual void DoDataExchange(CDataExchange* pDX);   
	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	virtual void PostNcDestroy();
	afx_msg void OnClose();
	afx_msg void OnSize(UINT nType, int cx, int cy);

	virtual CWnd* GetResizableWnd(){ return this; };
	void OnLButtonDown(UINT nFlags, CPoint point);

public:

	void enable_btn( int btnid_ , bool b);
	void set_slider_pos( int type_ ,int val );
	afx_msg void OnBnClickedSliderVolumePlayBtn();
	afx_msg void OnBnClickedSliderVolumeRecordBtn();
	afx_msg void OnNMReleasedcaptureSliderVolumeControlPlay(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMReleasedcaptureSliderVolumeControlRecord(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnBnClickedSliderVolumeTestSound();
	void on_change_volume_record_btn(bool is_must_, bool is_post_notify_ = false );
	void on_change_volume_play_btn( bool is_must_, bool is_post_notify_ = false );
private:

	void init_slider_ctrl();
	void ChangeLanguage();
	void DSkinLiteSkin();
	void add_anchor_ex();
	void init_tooltip();
	
public:

	CSliderCtrl		  slider_wave_ctrl_;
	CSliderCtrl       slider_mic_ctrl_;
	CToolTipCtrl			tooltip_;
	CButton			  play_btn_;
	CButton           record_btn_;
private:
	ip_data_manager* data_mgr_; 
	aot::sound::isound_card_svc*     sound_svc_;

	int             m_mic_must_;
	int             m_speaker_must_;

};
